// 导入axios实例
import instance from '@/utils/request.js'
// 删除用户搜索历史
export function getSearchListDelApi () {
  return instance({
    url: '/v1_0/search/histories',
    method: 'DELETE',
    // headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    needToken: true
  })
}
// 获取搜索结果
export function getSearchApi (params) {
  return instance({
    url: '/v1_0/search',
    // headers: { 'content-type': 'application/json' },
    needToken: true,
    params: params
  })
}
// 获取用户搜索历史11
export function getSearchTechApi () {
  return instance({
    url: '/v1_0/search/histories',
    // headers: { 'content-type': 'application/json' },
    needToken: true
  })
}
// 获取联想记忆
export function getSuggestionListApi (data) {
  return instance({
    url: '/v1_0/suggestion',
    // headers: { 'content-type': 'application/json' },
    params: data,
    needToken: true
  })
}

export function cancelStarApi (data) {
  return instance({
    url: `/v1_0/article/likings/${data}`,
    // headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    method: 'DELETE',
    needToken: true
  })
}
